package org.langqiao.io.file;

import java.io.File;

public class FileExtensionFilter  extends javax.swing.filechooser.FileFilter{
	
	private String description,extension;
	
	public FileExtensionFilter(String description,String extension) {
		this.description=description;
		this.extension=extension.toLowerCase();
	}
	
	public boolean accept(File f){
		return f.getName().toLowerCase().endsWith(this.extension);
	}
	
	public String getDescription() {
		return this.description;
	}

}
